package org.springblade.modules.admin.vo.plan;

import cn.hutool.core.convert.Convert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.admin.enums.StatusEnum;

import java.math.BigDecimal;

/**
 * 业绩统计V2
 *
 * @author zcc
 * @version 1.0
 * @date 2021/12/4 13:56
 */
@Data
@ApiModel("績效model")
public class PerformanceVoV2 {


	@ApiModelProperty("用户ID")
	private Long userId;

	@ApiModelProperty("组名称")
	private String groupId;

	@ApiModelProperty("1:在职0:离职")
	private Integer userStatus;

	@ApiModelProperty("用户名称")
	private String userName;


	@ApiModelProperty("1在职0离职")
	private String userStatusName;

	@ApiModelProperty("角色")
	private String roleName;

	@ApiModelProperty("组名称")
	private String groupName;

	@ApiModelProperty("安排维保梯数")
	private Integer maintainElevatorCount = 0;

	@ApiModelProperty("完成维保梯数")
	private Integer finishElevatorCount = 0;

	@ApiModelProperty("已排班数量")
	private Integer enWorkCount = 0;

	@ApiModelProperty("未排班数量")
	private Integer disWorkCount = 0;

	@ApiModelProperty("工作量(计划)")
	private Integer planWorkload = 0;

	@ApiModelProperty("工作量(完成)")
	private BigDecimal finishWorkload = Convert.toBigDecimal(0);

	@ApiModelProperty("工作量(及时的)")
	private BigDecimal inTimeWorkload = Convert.toBigDecimal(0);

	@ApiModelProperty("工作量及时率")
	private BigDecimal inTimeWorkloadRatio = Convert.toBigDecimal(0);

	@ApiModelProperty("工作量逾期")
	private BigDecimal workloadPostpone = Convert.toBigDecimal(0);

	@ApiModelProperty("工作量逾期率")
	private BigDecimal workloadPostponeRatio = Convert.toBigDecimal(0);

	@ApiModelProperty("签到次数")
	private Integer signCounts = 0;

	@ApiModelProperty("签退次数")
	private Integer signOutCounts = 0;

	@ApiModelProperty("平均工作时长")
	private BigDecimal avgWorkMinute = Convert.toBigDecimal(0);


	@ApiModelProperty("签到次数")
	private Integer signDetailCounts=0;

	@ApiModelProperty("实际签到次数")
	private Integer normalSignDetailCounts = 0;

	@ApiModelProperty("迟到次数")
	private Integer beLateCount = 0;

	@ApiModelProperty("早退次数")
	private Integer signOutLeaveEarlyCount = 0;

	@ApiModelProperty("考勤异常总数")
	private Integer signAbnormalCount = 0;

	@ApiModelProperty("补卡总数")
	private Integer updateSignCount = 0;


	@ApiModelProperty("缺卡总数")
	private Integer disSignCount = 0;


	@ApiModelProperty("加班总数")
	private Integer overtimeCount = 0;

	@ApiModelProperty("加班工时分钟")
	private Integer overtime = 0;

	@ApiModelProperty("签退次数")
	private Integer signDetailOutCounts = 0;



	public void setUserStatus(Integer userStatus) {
		this.userStatus = userStatus;
		if(userStatus== StatusEnum.ENABLE.getId()){
			this.userStatusName = "在职";
		}else{
			this.userStatusName = "离职";
		}
	}
}
